package main

import "fmt"

func main() {
	//getSum1(1,10)

	//getSum2(1,2,3,4)

	//getSum3("sum",":",456789,1)

	//arr := [5]int{1,2,3,4,5}
	//getSum4(arr)
	//fmt.Println(arr)

	//arr := [...]int{1,2,3,4}
	//getSum5(arr)
	//fmt.Println(arr)

	//sss := make([]int,0)
	//getSum6(sss)
	//fmt.Println(sss)

	map_ := make(map[string]string)
	//fmt.Println(map_)
	getSum7(map_)
	fmt.Println(map_)
}

func getSum1(a int, b int) {
	sum := 0
	for i := a; i <= b; i++ {
		sum += i
	}
	fmt.Println(sum)
}

func getSum2(sums ...int) {
	//fmt.Printf("%T\n",sums)
	sum := 0
	for _, val := range sums {
		sum += val
	}
	fmt.Println(sum)
}

func getSum3(a string, b string, sums ...int) {
	sum := 0
	for _, val := range sums {
		sum += val
	}
	fmt.Printf("%s%s%d\n", a, b, sum)
}

func getSum4(arr [5]int) {
	arr[4] = 100
	fmt.Println(arr)
}

func getSum5(arr [4]int) {
	arr[3] = 100
	fmt.Println(arr)
}

func getSum6(sss []int) {
	sss = append(sss, 6666)
	fmt.Println(sss)
}

func getSum7(map_ map[string]string) {
	map_["name"] = "lwl"
	fmt.Println(map_)
}
